package com.tianlan.blog.config;


//import org.apache.logging.log4j.LogManager;
//import org.apache.logging.log4j.Logger;
//import org.springframework.stereotype.Component;
//
//import com.fasterxml.jackson.annotation.JsonInclude;
//import com.fasterxml.jackson.databind.ObjectMapper;
//import com.fasterxml.jackson.databind.SerializationFeature;

//@SuppressWarnings("serial")
//@Component
//public class JsonMapper extends ObjectMapper {
//	private static final Logger log = LogManager.getLogger(JsonMapper.class);
//    
//	public JsonMapper() {
//        this.setSerializationInclusion(JsonInclude.Include.NON_NULL);
//        // 设置 SerializationFeature.FAIL_ON_EMPTY_BEANS 为 false
//        //System.out.println("防止jpa实体类序列化，我要输出！");
//        log.info("防止jpa实体类序列化，我要输出！");
//        this.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
//    }
//}